package org.brain.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


import org.brain.dbo.DBOperate;
import org.brain.pojos.Document;
import org.brain.tool.ToolBean;

@ManagedBean(name="DataOne")
@RequestScoped
public class ShowDataOneBean {

	String id;
	Document doc;
	public void initDoc()
	{
		id = ToolBean.getRequestParameter("id");
		doc = DBOperate.getDocument(Integer.parseInt(id));
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Document getDoc() {
		initDoc();
		return doc;
	}
	public void setDoc(Document doc) {
		this.doc = doc;
	}
	
	
	
	
}
